package com.df.ez_game.server.msg.client;

import com.baidu.bjf.remoting.protobuf.FieldType;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
import lombok.Data;

@Data
@ProtobufClass
public class ClientReqMsg {
    /**
     * 魔数，校验用
     */
    @Protobuf(fieldType = FieldType.INT32, order = 1)
    private Integer moshu;

    /**
     * 请求命令id
     */
    @Protobuf(fieldType = FieldType.INT32, order = 2)
    private Integer cmd;
    /**
     * 请求版本
     */
    @Protobuf(fieldType = FieldType.INT32, order = 3)
    private Integer ver;

    /**
     * 前端传过来的消息标记，一般用于区分消息序列，返回时会回传
     */
    @Protobuf(fieldType = FieldType.INT32, order = 4)
    private Integer msgSerial;
    /**
     * 是否需要回复
     */
    @Protobuf(fieldType = FieldType.BOOL, order = 5)
    private Boolean needResp;
    /**
     * 业务数据
     */
    @Protobuf(fieldType = FieldType.BYTES, order = 6)
    private byte[] data;

    //TODO 分布式集群模式下得拓展数据
    //tranceId(请求得全局唯一id)
    private String tranceId;
    //元数据(一般是分布式集群用，从网关带入)
}
